load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "cat",
    srcs = [
        "catalog.go",
        "column.go",
        "data_source.go",
        "family.go",
        "index.go",
        "object.go",
        "schema.go",
        "sequence.go",
        "table.go",
        "utils.go",
        "view.go",
        "zone.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/opt/cat",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/config/zonepb",
        "//pkg/geo/geopb",
        "//pkg/roachpb",
        "//pkg/security/username",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/privilege",
        "//pkg/sql/roleoption",
        "//pkg/sql/sem/catid",
        "//pkg/sql/sem/tree",
        "//pkg/sql/sessiondata",
        "//pkg/sql/types",
        "//pkg/util/treeprinter",
        "@com_github_cockroachdb_errors//:errors",
        "@com_github_cockroachdb_redact//:redact",
        "@com_github_lib_pq//oid",
    ],
)

go_test(
    name = "cat_test",
    size = "small",
    srcs = ["utils_test.go"],
    deps = [
        ":cat",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/opt/testutils/testcat",
        "//pkg/sql/sem/catconstants",
        "//pkg/sql/sem/tree",
    ],
)
